import request from '@/utils/request';

/**
 * 查询物料分类列表
 */
export function getCategoryList() {
    return request({
        url: '/oms/category/list',
        method: 'get'
    })
}

/**
 * 新增分类
 */
export function materialCategoryAdd(data) {
    return request({
        url: '/oms/category',
        method: 'post',
        data
    })
}

/**
 * 更新
 */
export function materialCategoryUpdate(data) {
    return request({
        url: '/oms/category',
        method: 'put',
        data
    })
}

/**
 * 删除分类
 */
export function materialCategoryDelete(ids) {
    return request({
        url: `/oms/category/${ids}`,
        method: 'delete',
    })
}

export default {
    materialCategoryAdd, materialCategoryUpdate
}
